package com.augurit.common.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * 岗位Entity类
 * 
 */
@Entity
@Table(name = "OM_POSITION")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class OmPosition {
	//属性
	private Long posId;			//主键ID
	private String posCode;		//岗位编号
	private String posName;		//岗位名称
	private Integer posLevel;	//岗位层次
	private Long parentPosId;	//上级岗位ID
	private Long partyId;		//隶属组织ID
	private Integer sortNo;		//排列顺序
	private String posType;		//岗位类型
	private String creator;		//创建人
	private Date createTime;	//创建时间
	private String updator;		//修改人
	private Date updateTime;	//修改时间
	private String status;		//岗位状态。0为注销，1为正常
	private String isLeaf;		//是否叶子节点。0为非叶子节点，1为叶子节点
	private Integer subCount;	//子节点数
	private String remark;		//备注
	private String posSeq;		//岗位序列

	
	@Id
    @SequenceGenerator(name="SEQ_OM_POSITION", sequenceName="SEQ_OM_POSITION", allocationSize=1)
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SEQ_OM_POSITION")
	public Long getPosId() {
		return posId;
	}

	public void setPosId(Long posId) {
		this.posId = posId;
	}

	public String getPosCode() {
		return posCode;
	}

	public void setPosCode(String posCode) {
		this.posCode = posCode;
	}

	public String getPosName() {
		return posName;
	}

	public void setPosName(String posName) {
		this.posName = posName;
	}

	public Integer getPosLevel() {
		return posLevel;
	}

	public void setPosLevel(Integer posLevel) {
		this.posLevel = posLevel;
	}

	public Long getParentPosId() {
		return parentPosId;
	}

	public void setParentPosId(Long parentPosId) {
		this.parentPosId = parentPosId;
	}

	public Long getPartyId() {
		return partyId;
	}

	public void setPartyId(Long partyId) {
		this.partyId = partyId;
	}

	public Integer getSortNo() {
		return sortNo;
	}

	public void setSortNo(Integer sortNo) {
		this.sortNo = sortNo;
	}

	public String getPosType() {
		return posType;
	}

	public void setPosType(String posType) {
		this.posType = posType;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getUpdator() {
		return updator;
	}

	public void setUpdator(String updator) {
		this.updator = updator;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getIsLeaf() {
		return isLeaf;
	}

	public void setIsLeaf(String isLeaf) {
		this.isLeaf = isLeaf;
	}

	public Integer getSubCount() {
		return subCount;
	}

	public void setSubCount(Integer subCount) {
		this.subCount = subCount;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getPosSeq() {
		return posSeq;
	}

	public void setPosSeq(String posSeq) {
		this.posSeq = posSeq;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}